import request from '@/utils/request'

// 查询运营计划列表
export function listPlan(query) {
  return request({
    url: '/operate/referrer/list',
    method: 'get',
    params: query
  })
}

// 查询运营计划详细
export function getPlan(id) {
  return request({
    url: '/operate/referrer/' + id,
    method: 'get'
  })
}

// 新增运营计划
export function addPlan(data) {
  return request({
    url: '/operate/referrer',
    method: 'post',
    data: data
  })
}

// 修改运营计划
export function updatePlan(data) {
  return request({
    url: '/operate/referrer',
    method: 'put',
    data: data
  })
}

// 删除运营计划
export function delPlan(id) {
  return request({
    url: '/operate/referrer/' + id,
    method: 'delete'
  })
}

// 导出运营计划
export function exportPlan(query) {
  return request({
    url: '/operate/referrer/export',
    method: 'get',
    params: query
  })
}
